<script>
	var domdfbywenxintishi='__URL__/domdfbywenxintishi';
  var domdfbygonggao='__URL__/domdfbygonggao';
</script>
<!--table部分-->
<div class='col-md-12'>
	<div class='col-md-6'  style='padding-top:20px;padding-bottom:20px' >
		<div class="form-group">
			<label for="">获取QQ帐号密码后的温馨提示语</label>
			<textarea class="form-control" id="qybscstwenxintishi">{$qybscsto['qybscstwenxintishi']}</textarea>
		</div>
		<button class="btn btn-default" id='mdfwenxintishi'>修改</button>
	</div>
  <div class='clearfix' style='border-bottom:solid 1px #ccc'></div>
  <div class='col-md-12'  style='padding-top:20px' >
    <div class="form-group">
      <label for="">公告设置</label>
      <script type="text/javascript">var project="{$project}";</script>
      <link rel="stylesheet" href="__PUBLIC__/etc/ueditor/themes/default/ueditor.css"/>
      <script type="text/javascript" src="__PUBLIC__/etc/ueditor/editor_config.js"></script>
      <script type="text/javascript" src="__PUBLIC__/etc/ueditor/editor_all.js"></script>
      <div>
        <div id="myEditor">
        <script type="text/javascript">
          var editor = new baidu.editor.ui.Editor({
              initialContent: '{$qybscsto.qybscstgonggao}'
          });
          editor.render("myEditor");
        </script>
        </div>
      </div>
      <textarea id='qybscstgonggao' style='display:none'></textarea>
      
    </div>
    <button class="btn btn-default" id='mdfgonggao'>修改</button>
  </div>
</div>

<script type="text/javascript">
$(function(){
	$('#mdfwenxintishi').click(function(){ 
		
      
      var obj=new Object();
      var qybscstwenxintishi=$.trim($('#qybscstwenxintishi').val());
      

      $('#loading').trigger('click');
      obj['qybscstwenxintishi']=qybscstwenxintishi;
     

      $.ajax({
          'type': 'GET',
          'url':domdfbywenxintishi,
          'async':false,  
          'contentType': 'application/json',
          'data': obj,
          'dataType': 'json',
          'success': function(data) {
            $('#loading_cancel').trigger('click');
          	alert('修改温馨提示成功！');

            console.log("success");
          },
          'error':function() {
            console.log("error");
          }
      });
	    
	})

  $('#mdfgonggao').click(function(){ 
    
      
      var obj=new Object();
      //$('#qybscstgonggao').val(editor.getContent());
      

      $('#loading').trigger('click');
      obj['qybscstgonggao']=editor.getContent();
     
      $.post(
        domdfbygonggao,
        obj,
        function(data){
          
          $('#loading_cancel').trigger('click');
          alert('修改公告成功！');
          console.log("success");
        
        
        },
        'json'
      );
      // $.ajax({
      //     'type': 'GET',
      //     'url':domdfbygonggao,
      //     'async':false,  
      //     'contentType': 'application/json',
      //     'data': obj,
      //     'dataType': 'json',
      //     'success': function(data) {
      //       $('#loading_cancel').trigger('click');
      //       alert('修改公告成功！');

      //       console.log("success");
      //     },
      //     'error':function() {
      //       console.log("error");
      //     }
      // });
      
  })
})
</script>

